<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理 -- Talking</title>
<link rel="stylesheet" href="./static/css/frame.css" />
<script src="./static/js/jquery-1.3.min.js"></script>
<script>
$(document).ready(function(){
    $('#addLink').click(function(){
        $('.list tr:last').before("<tr>"+
        "<td></td>"+
        "<td><input type='text' value='0' style='width:30px;' name='orderNo[ ]' /></td>"+
        "<td><input type='text' style='width:90%;' name='name[ ]' /></td>"+
        "<td><input type='text' style='width:90%;' name='url[ ]' /></td>"+
        "<td><input type='text' style='width:90%;' name='describe[ ]' /></td>"+
        "</tr>");
        if($('body').height()>=500){
            top.resizeFrame();
        }
    });
    $('#chkDel').click(function(){
        if($(this).attr('checked')==true){
            $('input[type=checkbox]').each(function(i){
                $(this).attr('checked','checked');
            });
        }
        else{
            $('input[type=checkbox]').each(function(i){
                $(this).removeAttr('checked');
            });
        }
    });
});
</script>
</head>

<body>
<div id="content">
	<div class="title">全局 » 友情链接</div>
	<div class="main">
		<h3>友情链接</h3>                   
        <form action="link.php" name="form" method="post"> 
		<table cellpadding="0" cellspacing="0" class="list">
			<tbody>
				<tr>
					<td width="30" align="center">删除</td>
					<td width="50">排序</td>
					<td width="20%">网站名称</td>
					<td width="30%">链接地址</td>
					<td>链接描述</td>
				</tr>
                {{section name=n loop=$links}}
				<tr>
				    <td align="center"><input type="checkbox" name="del[ ]" value="{{$links[n].LinkID}}" /></td>
					<td>{{$links[n].LinkOrderNo}}</td>
					<td>{{$links[n].LinkName}}</td>
					<td>{{$links[n].LinkURL}}</td>
					<td>{{$links[n].LinkDescribe}}</td>
				</tr>
                {{/section}}
                <tr>
                  <td align="center"><input type="checkbox" id="chkDel" /></td>
                  <td colspan="4">
                    <a href="javascript:void(0)" id="addLink">添加友情链接</a>
                  </td>
                </tr>
			</tbody>
		</table>
		<p>
			<input type="submit" name="submit" class="button_submit" value="提交" />
            <span>{{$tip}}</span>  
		</p> 
        </form>       
	</div>
</div>
</body>
</html>
